﻿namespace Facade
{
    internal class Database
    {
        private Database() { }
        public static Dictionary<string, string> GetProperties(string dbName)
        {
            var dictionary = new Dictionary<string, string>();

            var fileName = $"{dbName}.txt";
            using (var sr = new StreamReader(fileName))
            {
                while (!sr.EndOfStream)
                {
                    var line = sr.ReadLine() ?? "";
                    var l = line.Split("=");
                    dictionary.Add(l[0], l[1]);
                }
            }

            return dictionary;
        }
    }
}
